<!--
 * @Author: lmk
 * @Date: 2021-11-15 10:11:34
 * @LastEditTime: 2021-11-30 20:22:15
 * @LastEditors: lmk
 * @Description: 
-->
<template>
	<mescroll-uni :ref="'mescrollRef'+tabIndex" @init="mescrollInit"   @down="downCallback" @up="upCallback">
		<view class="u-padding-left-32 u-padding-right-32 swiper-box-padding" v-if="dataList.length">
			<view  v-for="(item,index) in dataList" :key="index" class="u-margin-bottom-20">
				<item-box padding="0">
					<view class="u-flex u-col-top u-padding-left-48 u-padding-right-20 u-padding-top-40 u-padding-bottom-46">
						<item-image type="1" :img="item.avatar" :size="120"/>
						<view class="u-margin-left-28 text-order-time u-flex-1">
							<text class="box-title  text-bold u-font-32">{{item.nickname}}</text>
							<view class="u-margin-top-18 u-font-24">提交日期：{{item.crateTime | timeFormat}}</view>
							<view class="u-margin-top-14 u-font-24">意向剧本：{{item.productName||''}}</view>
							<template v-if="loginForm.userType=='issue'">
								<view class="u-margin-top-14 u-font-24">提交次数：{{item.count || ''}}次</view>
								<view class="u-margin-top-14 u-font-24">所在城市：{{item.cityName||''}}</view>
							</template>
						</view>
						<view class="text-color-txtTheme u-font-26"  @click="goPathDetail(item)">详细信息</view>
					</view>
				</item-box>
			</view>
			
		</view>
	</mescroll-uni>
</template>

<script>
	import upCallback from '@/mixins/upCallbackMixin.js'
	export default {
		mixins:[upCallback],
		props:{
			tab:{
				type:Object,
				default:()=>({})
			},
			tabIndex:{
				type:Number,
				default:0
			},
			inputName:{
				type:String,
				default:''
			},
		},
		
		data() {
			return {
				apiModule:'shopApi',
				apiType:'userIntention',
				name:"findSmallPage",
			}
		},
		// watch:{
		// 	inputName(val){
		// 		this.$u.debounce(()=>{
		// 			this.form.name = val;
		// 			this.downCallback();
		// 		},300)
		// 	}
		// },
		created() {
			const {type} = this.tab;
			this.form = {type}
		},
		methods: {
			goPathDetail(item){
				this.$emit('goPathDetail',item);
				// this.$u.route({
				// 	url:'/pagesA/want/detail',
				// 	params:{
				// 		...this.option,
				// 		id:item.id
				// 	}
				// })
			}
		}
	}
</script>

<style>
</style>
